<include file="Public/header"/>
<body>
 <header>
      <div class="tab_nav">
        <div class="header">
          <div class="h-left"><a class="sb-back" href="javascript:history.back(-1)" title="返回"></a></div>
          <div class="h-mid"><img src="__STATIC__/images/toplogo.png">我的团队</div>
          <div class="h-right">
            <aside class="top_bar">
              <div onClick="show_menu();$('#close_btn').addClass('hid');" id="show_more"><a href="javascript:;"></a> </div>
            </aside>
          </div>
        </div>
      </div>
</header>
<include file="Public/menu"/>
<div id="tbh5v0">
<div class="liuyan">
    <div class="liuyan_list">
     	<div class="layout pa-to-10 fo-fa-ar">
            <!--菜单-->
            <script src="__PUBLIC__/js/jquery-1.8.3.min.js"></script>
            <link rel="stylesheet" href="__PUBLIC__/css/zTreeStyle.css" type="text/css"/>
            <script type="text/javascript" src="__PUBLIC__/js/jquery.ztree.core-3.5.js"></script>
            <script type=text/javascript>
                var setting = {
                    view: {
                        showLine: true
                    },
                    data: {
                        simpleData: {
                            enable: true
                        }
                    }
                };
                var zNodes = [
                    {id: 1, pId: 0, name: "父節點1 - 展開", open: true},
                    {id: 11, pId: 1, name: "父節點11 - 摺疊"},
                    {id: 111, pId: 11, name: "葉子節點111"},
                    {id: 112, pId: 11, name: "葉子節點112"},
                    {id: 113, pId: 11, name: "葉子節點113"},
                    {id: 114, pId: 11, name: "葉子節點114"},
                    {id: 12, pId: 1, name: "父節點12 - 摺疊"},
                    {id: 121, pId: 12, name: "葉子節點121"},
                    {id: 122, pId: 12, name: "葉子節點122"},
                    {id: 123, pId: 12, name: "葉子節點123"},
                    {id: 124, pId: 12, name: "葉子節點124"},
                    {id: 13, pId: 1, name: "父節點13 - 沒有子節點", isParent: true},
                    {id: 2, pId: 0, name: "父節點2 - 摺疊"},
                    {id: 21, pId: 2, name: "父節點21 - 展開", open: true},
                    {id: 211, pId: 21, name: "葉子節點211"},
                    {id: 212, pId: 21, name: "葉子節點212"},
                    {id: 213, pId: 21, name: "葉子節點213"},
                    {id: 214, pId: 21, name: "葉子節點214"},
                    {id: 22, pId: 2, name: "父節點22 - 摺疊"},
                    {id: 221, pId: 22, name: "葉子節點221"},
                    {id: 222, pId: 22, name: "葉子節點222"},
                    {id: 223, pId: 22, name: "葉子節點223"},
                    {id: 224, pId: 22, name: "葉子節點224"},
                    {id: 23, pId: 2, name: "父節點23 - 摺疊"},
                    {id: 231, pId: 23, name: "葉子節點231"},
                    {id: 232, pId: 23, name: "葉子節點232"},
                    {id: 233, pId: 23, name: "葉子節點233"},
                    {id: 234, pId: 23, name: "葉子節點234"},
                    {id: 3, pId: 0, name: "父節點3 - 沒有子節點", isParent: true}
                ];

                $(document).ready(function () {
                    var $user1 = $('#user1').val();

                    $.ajax({
                        type: "post",
                        dataType: "json",
                        global: false,
                        url: "__MODULE__/Zmd/getTree",
                        data: {
                            user1: $user1
                        },
                        success: function (data, textStatus) {
                            //console.log(data);
                            if (data.status == 0) {
                                zNodes1 = data.data;
                                $.fn.zTree.init($("#treeDemo"), setting, zNodes1);
                            } else {
                                alert("您還沒有");
                            }
                            return;
                        }
                    });

                    $('#btn').click(function () {
                        var $user = $('#user').val();
                        if($user == ''){
                            alert('请输入会员帐号');return false;
                        }
                        $.ajax({
                            type: "post",
                            dataType: "json",
                            global: false,
                            url: "__MODULE__/Zmd/getTreeso",
                            data: {
                                user: $user
                            },
                            success: function (data, textStatus) {
                                console.log(data);
                                if (data.status == 0) {
                                    zNodes1 = data.data;
                                    $.fn.zTree.init($("#treeDemo"), setting, zNodes1);
                                } else {
                                    alert(data.data);
                                }
                                return;
                            }
                        });
                    });
                });
            </script>
            <!--菜单-->
            <div class="row">
                <div class="col-sm-3">
                    <form method="get" action="">
                        <div class="input-group">
                            <input name="user1" id="user1" type="hidden" value="{$aa}"/>
                          <!--  <input type="text" class="scinput" style="width:200px; margin-left: 20px;" placeholder="请输入会员账号" name="user"
                                   id="user"/>
                            <span class="input-group-btn">
                                <button type="button" class="scbtn1" id="btn"> 搜索</button>
                            </span>-->
                        </div>
                    </form>
                </div>
            </div>
            <div class="table-responsive">
                <ul id="treeDemo" class="ztree"></ul>
            </div>
        </div>
    </div>
    
    <div class="liuyandom"> 
      
    </div>
</div>

<script>

function verify(){
   $('#verify_code_img').attr('src','/index.php?m=Mobile&c=User&a=verify&type=message&r='+Math.random());
}
	
$('.anniu ul li').click(function(){
	$(this).find("input").attr("checked","checked");
	$('.anniu ul li').removeClass("on");
	$(this).addClass("on");
})

function submitMsg() {
	var frm = document.forms['formMsg'];
	var msg_title = frm.elements['msg_title'].value;
	var msg_content = frm.elements['msg_content'].value;
	var msg = '';
	if (msg_title.length == 0) {
		alert('留言标题不能为空');
		return false
	}
	if (msg_content.length == 0) {
		alert('留言内容不能为空');
		return false
	}
	if (msg_title.length > 100) {
		alert('标题不能超过100字符');
		return false
	}
	if ($.trim($('#verify_code').val()).length == 0) {
		alert('验证码不能为空');
		return false
	}
	
	
	return true;
}
</script>
<include file="Public/footer"/>
</div>
<include file="Public/footer_nav"/>
</body>
</html>